<script setup lang="ts">
import whiteBg from './img/home-bg-white.jpg';
</script>

<template>
    <div ref="homeRef" class="m-home" :style="{ backgroundImage: `url(${whiteBg})` }">
        <div class="m-home__title">
            <h1>欢迎进入灯塔APS</h1>
            <h2>一款专为制造业智能工厂设计的生产计划与智能排程轻量级后台管理系统</h2>
        </div>
        <div class="m-home__icon">
            <div class="m-home__icon--svg" />
        </div>
    </div>
</template>

<style scoped lang="scss">
@include b(m-home) {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    background: url('./img/1.png') center no-repeat;
    background-size: 100% 100%;
    border-radius: 8px;

    @include e(icon) {
        flex: 1;
        min-width: 400px;
        height: 500px;

        @include m(svg) {
            @include flex;

            height: 100%;
            margin: 0 40px 0 100px;
            background-size: 90% 90%;
        }
    }

    @include e(title) {
        position: relative;
        width: 500px;
        margin-left: 200px;
        line-height: 42px;
        color: var(--q-text-color-primary);

        h1 {
            font-size: 46px;
            font-weight: 700;
        }

        h2 {
            margin-top: 62px;
            font-size: 24px;
            line-height: 36px;
            color: var(--q-text-color-secondary);
        }
    }
}

@media (width <= 1400px) {
    @include b(m-home) {
        @include e(title) {
            position: relative;
            width: 400px;
            margin-left: 100px;
            line-height: 42px;
            color: var(--q-text-color-primary);

            h1 {
                font-size: 32px;
                font-weight: 700;
            }

            h2 {
                margin-top: 40px;
                font-size: 18px;
                line-height: 24px;
                color: var(--q-text-color-secondary);
            }
        }

        @include e(icon) {
            @include m(svg) {
                margin-right: 0;
                background-size: 80%;
            }
        }
    }
}
</style>
